package demo05;

/**
 * @author JYH
 * @version 1.0
 * @date 2022/11/1 15:27
 */
public class TestDaemonDemo {
    public static void main(String[] args) {
        DaemonDemo d1 = new DaemonDemo();
        d1.setDaemon(true);
        d1.start();

        for (int i = 0; i < 10; i++) {
            System.out.println(Thread.currentThread().getName()+"==="+i);
        }
    }
}
class DaemonDemo extends Thread{
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println(Thread.currentThread().getName()+"==="+i);
        }
    }
}